import {http} from './request'
export const orderAPI={
    listOrdersByUserId:(userId) => http.secure.get('/orders',userId),
    addOrders:(data)=>http.secure.post('/orders',data),
    getOrderById:(orderId)=>http.secure.get(`/orders/${orderId}`),
    listOrdersByBusinessId:(businessId)=>http.secure.get(`/orders/business/${businessId}`),
    updateOrderState:(id,orderState)=>http.secure.put(`/orders/${id}/state?orderState=${orderState}`),
}